Skip to content

fix(skills): delete the TLC state files of each model check after its run and when it stops - #532

Merged
pdevito3 merged 1 commit into
mainfrom
fix/tlc-state-cleanup
Nov 16, 2026
Merged

pdevito3 merged 1 commit into
mainfrom
fix/tlc-state-cleanup

Conversation

@pdevito3

Copy link
Copy Markdown
Owner

Why

The formal verification skills must be safe to run again and again. A stopped run of .agents/skills/membership-lifecycle/check.sh left 16 GB of TLC state in $TMPDIR. TLC deletes its state files only when a run ends normally. A kill, a timeout, or an agent that stops waiting leaves them. No script had a trap. The object storage script also never deleted its mktemp -d folder.

What changed

  • Each of the three check scripts deletes the -metadir of a TLC run when the run ends.
  • A trap on EXIT, INT, TERM, and HUP deletes the remaining state folders. The logs stay.
  • The membership and object storage scripts delete their temp folder when each config gives its expected result. When a config fails, only its logs stay.
  • The object storage temp folder now has a name: object-storage-lifecycle.XXXXXX.

Scope

Only the three check.sh scripts. No model, config, or verdict changes.

Tradeoffs

A failed run keeps its logs but not its TLC state, so a failed run cannot be resumed with -recover. None of the scripts used -recover.

Blast Radius

Local runs of the model checks. CI does not run them.

Verification

  • membership-lifecycle/check.sh MC.cfg, stopped with TERM after 30 s: the folder went from 309M to 4K. MC.out stayed, and no TLC process stayed. Exit 130.
  • membership-lifecycle/check.sh Managers.cfg: PASS, and no temp folder stays.
  • object-storage-lifecycle/check.sh Chart LateCommit: both baseline, and no temp folder stays.
  • bff-session-lifecycle/model/check.sh: every verdict ok, and 0 .meta folders stay.
  • sh -n passes on each script.

… run and when it stops

A stopped run of the membership check left 16 GB of TLC state in the temp folder. Each check script now deletes the -metadir of a run when the run ends, and a trap deletes the rest on exit or on INT, TERM, or HUP. The logs stay. The membership and object storage scripts delete their temp folder when every config gives its expected result.
@pdevito3
pdevito3 merged commit 2ae9c0a into main Nov 16, 2026
16 checks passed
@pdevito3
pdevito3 deleted the fix/tlc-state-cleanup branch November 16, 2026 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant